1. Field of the Invention
The present invention relates to a device for efficient identification of data characteristics for flash memory and, more particularly, to a device having a plurality of hashing units to efficiently identify the characteristics of the data stored in logical block address, applicable to data access to flash memory.
2. The Related Arts
The flash memory is widely used in storing multimedia data, such as digital images or audio data. However, during the access process, the conventional flash memory requires a plurality of logical block addresses (LBA) to store the system storage time of the flash memory to provide the data update time of the stored data to the flash memory access control circuit on the devices, such as digital camera, cell phone, card reader or computer, for file editing and management. Therefore, the frequency of data update and related state information is an important identification parameter for the flash memory access control.
There are two conventional methods to identify how often the data in flash memory is updated. The first method, as disclosed in the paper by M. L. Chiang, Paul C. H. Lee, and R. C. Chang, “Managing Flash Memory in Personal Communication Devices,” ISCE, 1997, December (pp. 177-182), is to maintain a large array for storing the last access time of all the LBA that the system can possibly access. When the system receives a new write request, the current system time is compared with the last access time of the LBA. If the difference between the two is within a system-defined range, the data is identified as being frequently updated; otherwise, the data is identified as being infrequently updated. The drawback of this method is that it uses a large amount of memory. For example, for a 512 M bytes flash memory, with 512-bytes as an access unit, there will be 1,048,576 LBA for access. If four bytes are required for storing a time unit, this method requires 4M bytes for storing the time information.
The second method, as disclosed by L. P. Chang and T. W. Kuo, “An Adaptive Striping Architecture for Flash memory Storage Systems of Embedded Systems,” 8th IEEE RTAS, September 2002 (pp. 187-196), is to use two linked lists to record the recently accessed LBA. The first linked list is a hot list, with each node of the hot list storing an LBA whose data is frequently updated. The second list is a candidate list, which is an under-study of the first list. To save the memory, the length of each list is restricted. For example, the first list has 512 nodes, and the second list has 1024 nodes. When the system receives a write request, the system first checks whether the corresponding LBA is in the hot list. If so, the LBA is identified as being frequently updated, and the corresponding node for the LBA is moved to the head of the hot list. Otherwise, the LBA is identified as being infrequently updated, and is checked to determine whether it is in the candidate list. If the LBA is in the candidate list, the corresponding node is added to the head of the hot list, and if the hot list is full, the last node of the hot list is moved to the head of the candidate list. If the LBA is not in the candidate list, the LAB is stored in a new node and the new node is added to the head of the candidate list, and if the candidate list is full, the last node of the candidate list is removed.
Although the second method consumes less memory than the first method, the drawback of the second method is that the execution time is unstable. This is because the system may find the node at the head of the first list, or may search the entire two lists without finding the node. This causes the unstable factor of the flash access and the CPU cycle to affect the overall efficiency of the flash memory usage.